<template>
	<view>
		<view class="c-box-nobg">
			<u-swiper :list="swiper" keyName="img" indicator></u-swiper>
		</view>
		<view class="c-box-nobg">
			<view class="fl fs26">
				<u-icon name="map"></u-icon>
				<text>{{detail.address}}</text>
			</view>
			<view class="fl fs26">
				<u-icon name="phone"></u-icon>
				<text>{{detail.phone}}</text>
			</view>
			<view class="fl fs26">
				<u-icon name="clock"></u-icon>
				<text>{{detail.workTime}}</text>
			</view>
			<view class="fs26">
				剩余床位:男{{detail.bedsCountBoy}}个，女{{detail.bedsCountGirl}}个
			</view>
		</view>
		<view class="c-box-nobg">
			<c-label title="详细介绍"></c-label>
		</view>
		<view class="c-box">
			<view class="mb8">
				驿站简介
			</view>
			<u-line></u-line>
			<view class="fs28 mt16">
				{{detail.introduce}}
			</view>
		</view>
		<view class="c-box">
			<view class="mb8">
				房间配置
			</view>
			<u-line></u-line>
			<view class="fs28 mt16">
				{{detail.internalFacilities}}
			</view>
		</view>
		<view class="c-box">
			<view class="mb8">
				周边配套
			</view>
			<u-line></u-line>
			<view class="fs28 mt16">
				{{detail.surroundingFacilities}}
			</view>
		</view>
		<view class="c-box">
			<view class="mb8">
				特色服务
			</view>
			<u-line></u-line>
			<view class="fs28 mt16">
				{{detail.specialService}}
			</view>
		</view>
	</view>
</template>
<script setup>
	import {onLoad} from '@dcloudio/uni-app'
import { ref,getCurrentInstance } from 'vue';
import { getStationDetailAPI } from '../../../api/youthStation';
	const id = ref()
	const {proxy} =getCurrentInstance()
	const detail = ref({})
	const swiper = ref([])
	const getDetail =async ()=>{
		const res =await getStationDetailAPI(id.value)
		detail.value =res.data
		 detail.value.imageUrlList.map(item=>{
			swiper.value.push({img:proxy.$http+item})
		})
	}
	onLoad((options)=>{
		id.value= options.id
		getDetail()
	})
</script>

<style>

</style>
